home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
AdobeExamples
/
NX_StrAdj
/
StrokeViewWraps.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-06-12
|
10KB
|
317 lines
/* StrokeViewWraps.c generated from StrokeViewWraps.psw
by unix pswrap V1.009 Wed Apr 19 17:50:24 PDT 1989
*/
#include <dpsclient/dpsfriends.h>
#include <string.h>
#line 1 "StrokeViewWraps.psw"
/*
* (a) (C) 1990 by Adobe Systems Incorporated. All rights reserved.
*
* (b) If this Sample Code is distributed as part of the Display PostScript
* System Software Development Kit from Adobe Systems Incorporated,
* then this copy is designated as Development Software and its use is
* subject to the terms of the License Agreement attached to such Kit.
*
* (c) If this Sample Code is distributed independently, then the following
* terms apply:
*
* (d) This file may be freely copied and redistributed as long as:
* 1) Parts (a), (d), (e) and (f) continue to be included in the file,
* 2) If the file has been modified in any way, a notice of such
* modification is conspicuously indicated.
*
* (e) PostScript, Display PostScript, and Adobe are registered trademarks of
* Adobe Systems Incorporated.
*
* (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
* CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
* AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
* ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
* OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
* WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
* WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
* DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS.
*/
/*
* StrokeViewWraps.psw
*/
#line 45 "StrokeViewWraps.c"
void PSWMarkTime( void )
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 3, 28,
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* StartTime */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328}, /* realtime */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"StartTime"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[0].val.nameVal = _dpsCodes[0];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,28);
}
#line 39 "StrokeViewWraps.psw"
#line 85 "StrokeViewWraps.c"
void PSWReturnTime(int *ElapsedTime)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
DPSBinObjGeneric obj3;
DPSBinObjGeneric obj4;
DPSBinObjGeneric obj5;
DPSBinObjGeneric obj6;
DPSBinObjGeneric obj7;
DPSBinObjGeneric obj8;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 9, 76,
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328}, /* realtime */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* StartTime */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169}, /* sub */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119}, /* printobject */
{DPS_LITERAL|DPS_INT, 0, 0, 0},
{DPS_LITERAL|DPS_INT, 0, 0, 1},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119}, /* printobject */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70}, /* flush */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
DPSResultsRec _dpsR[1];
static const DPSResultsRec _dpsRstat[] = {
{ dps_tInt, -1 },
};
_dpsR[0] = _dpsRstat[0];
_dpsR[0].value = (char *)ElapsedTime;
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"StartTime"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[1].val.nameVal = _dpsCodes[0];
DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
DPSAwaitReturnValues(_dpsCurCtxt);
}
#line 44 "StrokeViewWraps.psw"
#line 146 "StrokeViewWraps.c"
void PSWDefs( void )
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjGeneric obj0;
DPSBinObjGeneric obj1;
DPSBinObjGeneric obj2;
DPSBinObjGeneric obj3;
DPSBinObjGeneric obj4;
DPSBinObjGeneric obj5;
DPSBinObjGeneric obj6;
DPSBinObjGeneric obj7;
DPSBinObjGeneric obj8;
DPSBinObjGeneric obj9;
DPSBinObjGeneric obj10;
DPSBinObjGeneric obj11;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 8, 100,
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* MakeLine */
{DPS_EXEC|DPS_ARRAY, 0, 2, 80},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14}, /* bind */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_LITERAL|DPS_NAME, 0, 0, 0}, /* MakeArc */
{DPS_EXEC|DPS_ARRAY, 0, 2, 64},
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14}, /* bind */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 5}, /* arc */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99}, /* lineto */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[2] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"MakeLine",
"MakeArc"};
long int *_dps_nameVals[2];
_dps_nameVals[0] = &_dpsCodes[0];
_dps_nameVals[1] = &_dpsCodes[1];
DPSMapNames(_dpsCurCtxt, 2, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[0].val.nameVal = _dpsCodes[0];
_dpsP[4].val.nameVal = _dpsCodes[1];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,100);
}
#line 55 "StrokeViewWraps.psw"
#line 207 "StrokeViewWraps.c"
void PSWMakeLine(float X0, float Y0, float X1, float Y1)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjReal obj0;
DPSBinObjReal obj1;
DPSBinObjReal obj2;
DPSBinObjReal obj3;
DPSBinObjGeneric obj4;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 5, 44,
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X1 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y1 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X0 */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y0 */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* MakeLine */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"MakeLine"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[2].val.realVal = X0;
_dpsP[3].val.realVal = Y0;
_dpsP[0].val.realVal = X1;
_dpsP[1].val.realVal = Y1;
_dpsP[4].val.nameVal = _dpsCodes[0];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,44);
}
#line 59 "StrokeViewWraps.psw"
#line 255 "StrokeViewWraps.c"
void PSWMakeArc(float X, float Y, float Rad, float AngBeg, float AngEnd)
{
typedef struct {
unsigned char tokenType;
unsigned char topLevelCount;
unsigned short nBytes;
DPSBinObjReal obj0;
DPSBinObjReal obj1;
DPSBinObjReal obj2;
DPSBinObjReal obj3;
DPSBinObjReal obj4;
DPSBinObjReal obj5;
DPSBinObjReal obj6;
DPSBinObjGeneric obj7;
DPSBinObjReal obj8;
DPSBinObjGeneric obj9;
} _dpsQ;
static const _dpsQ _dpsStat = {
DPS_DEF_TOKENTYPE, 10, 84,
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Rad */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: AngBeg */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: AngEnd */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: X */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Rad */
{DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
{DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: Y */
{DPS_EXEC|DPS_NAME, 0, 0, 0}, /* MakeArc */
}; /* _dpsQ */
_dpsQ _dpsF; /* local copy */
register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
static long int _dpsCodes[1] = {-1};
{
if (_dpsCodes[0] < 0) {
static const char * const _dps_names[] = {
"MakeArc"};
long int *_dps_nameVals[1];
_dps_nameVals[0] = &_dpsCodes[0];
DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
}
}
_dpsF = _dpsStat; /* assign automatic variable */
_dpsP[0].val.realVal =
_dpsP[5].val.realVal = X;
_dpsP[1].val.realVal =
_dpsP[8].val.realVal = Y;
_dpsP[2].val.realVal =
_dpsP[6].val.realVal = Rad;
_dpsP[3].val.realVal = AngBeg;
_dpsP[4].val.realVal = AngEnd;
_dpsP[9].val.nameVal = _dpsCodes[0];
DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,84);
}
#line 63 "StrokeViewWraps.psw"